//
//  Leaf.swift
//  GroupPattern
//
//  Created by mac on 2017/11/15.
//  Copyright © 2017年 RRC. All rights reserved.
//

import Foundation


//叶子节点的实现
/*
public class Leaf:ILeaf {
    ///叶子叫什么名字
    private var name = ""
    ///叶子的职位
    private var position = ""
    ///叶子的薪水
    private var salay = 0
    
    //通过构造函数传递信息
    init(name:String, position:String, salay:Int) {
        self.name = name
        self.position = position
        self.salay = salay
    }
    //最小的小兵只能获得自己的信息
    func getInfo() -> String {
        var info = ""
        info = "名称：" + self.name
        info = info + "\t职位：" + self.position
        info = info + "\t薪水：\(self.salay)"
        return info
    }
    
    
}
 */
//修改Leaf类
public class Leaf:Crop{
    //就写一个构造函数，这个是必需的
    init(name:String, position:String, salay:Int) {
        super.init(name: name, position: position, salary: salay)
    }
}
